import { API } from '../utils/config'
class IndexModel {
  constructor() {

  }

  getDatas({ swiper, phone, field }) {
    const url = `getDatas?swiper=${swiper}&phone=${phone}&field=${field}`
    return new Promise((resolve, reject) => {
      try {
        $.ajax({
          url: API + url,
          type: 'GET',
          dataType: 'JSONP',
          jsonp: 'cb',
          success(data) {
            resolve(data)
          }
        })
      } catch (error) {
        reject(error)
      }
    })
  }
}


export { IndexModel }